﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UITLibraryManagement.Repository
{
    public class DocGiaRepository : GenericRepository<DOCGIA>, IDocGiaRepository
    {
        public List<DOCGIA> GetListDocGia(int limit = 20)
        {
            return GetQuery().Take(limit).ToList();
        }


        public bool IsExist(DOCGIA docgia)
        {
            var count = GetQuery().Where(e => e.Equals(docgia)).Count();
            if (count > 0)
                return true;
            return false;
        }
    }
}
